import api from '../index'
import tools from '@/tools'
import config from "@/config"

// 查询task列表
export const listTaskAll = (params) => {
  var userId = localStorage.getItem("userId")
  const url = `${config.pre}/supplier-activity/task/list?userId=${userId}`
  return api.get(url,params)
}

export const formDataShow = (id) => {
	var userId = localStorage.getItem("userId")
	const url = `${config.pre}/supplier-activity/task/formDataShow/${id}?userId=${userId}`
	return api.get(url)
}

// 查询表单
export const formDataSave = (taskID,data) => {
	var userId = localStorage.getItem("userId")
  const url = `${config.pre}/supplier-activity/task/formDataSave/v2/${taskID}?userId=${userId}`
  return api.post(url, data)
}

export const supplierTask = () => {
	
}

export const doListTask = (params) => {
	var userId = localStorage.getItem("userId")
	const url = `${config.pre}/supplier-activity/task/history/${userId}`
	return api.get(url, params)
}